﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ViewTrips.aspx.cs" Inherits="TravelAgencyAspNet.Agents.ViewTrips" %>
<%@ Register assembly="Telerik.OpenAccess.Web" namespace="Telerik.OpenAccess" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    You are viewing all trips!!
    <asp:ScriptManager runat="server">
    </asp:ScriptManager>
    <telerik:radgrid runat="server" DataSourceID="OpenAccessDataSourceTrips" ID="RadGridTrips">
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <MasterTableView autogeneratecolumns="False" datasourceid="OpenAccessDataSourceTrips">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
        <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>

        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
        <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBinaryImageColumn DataField="Photo.PhotoContent"  
                    DefaultImageUrl="http://upload.wikimedia.org/wikipedia/commons/6/60/Earth_from_Space.jpg"
                    HeaderText="Photo" FilterControlAltText="Filter EndDate column" 
                    ImageHeight="100px" ImageWidth="100px" ResizeMode="Fit"
                    SortExpression="PhotoId" UniqueName="PhotoId" >
                </telerik:GridBinaryImageColumn>                
                <telerik:GridBoundColumn DataField="Title" 
                    FilterControlAltText="Filter Title column" HeaderText="Title" 
                    SortExpression="Title" UniqueName="Title">
                </telerik:GridBoundColumn>        
                <telerik:GridBoundColumn DataField="StartDate" DataType="System.DateTime" 
                    FilterControlAltText="Filter StartDate column" HeaderText="StartDate" 
                    SortExpression="StartDate" UniqueName="StartDate">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="EndDate" DataType="System.DateTime" 
                    FilterControlAltText="Filter EndDate column" HeaderText="EndDate" 
                    SortExpression="EndDate" UniqueName="EndDate">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Price" DataType="System.Decimal" 
                    FilterControlAltText="Filter Price column" HeaderText="Price" 
                    SortExpression="Price" UniqueName="Price"   >
                </telerik:GridBoundColumn>        
                <telerik:GridBoundColumn DataField="MaxPeopleCapacity" DataType="System.Int32" 
                    FilterControlAltText="Filter MaxPeopleCapacity column" 
                    HeaderText="MaxPeopleCapacity" SortExpression="MaxPeopleCapacity" 
                    UniqueName="MaxPeopleCapacity">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CurrentPeopleCapacity" 
                    DataType="System.Int32" 
                    FilterControlAltText="Filter CurrentPeopleCapacity column" 
                    HeaderText="CurrentPeopleCapacity" SortExpression="CurrentPeopleCapacity" 
                    UniqueName="CurrentPeopleCapacity">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>

        <FilterMenu EnableImageSprites="False"></FilterMenu>

        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:radgrid>

    <telerik:OpenAccessDataSource ID="OpenAccessDataSourceTrips" runat="server" 
            ObjectContextProvider="TravelAgencyDAL.TravelAgencyEntities, TravelAgencyDAL" 
            OrderBy="" TypeName="TravelAgencyDAL.Trip" >
    </telerik:OpenAccessDataSource>

    <telerik:RadDatePicker runat="server"  />
    
</asp:Content>
